package com.guoxin.chapter2.synchronizedblocklockall.test2;

public class Service {

	public void testMehotd1(MyObject myObject) {
		synchronized (myObject) {
			try {
				System.out.println("testMehotd1 __getLock time=" + System.currentTimeMillis() + " run ThreadName="
						+ Thread.currentThread().getName());
				Thread.sleep(2000);
				System.out.println("testMehotd1 __releaseLock time=" + System.currentTimeMillis() + " run ThreadName="
						+ Thread.currentThread().getName());
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
